import request from '@/utils/request'

// 获取权限列表接口
export function permissionListAPI() {
  return request({
    url: '/sys/permission',
    method: 'get'
  })
}
// 新增权限点接口
export function addPermissionAPI(data) {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
// 删除权限接口
export function delPermissionAPI(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}
// 获取权限点详情接口
export function perDetailAPI(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'get'
  })
}
// 修改权限点详情接口
export function putPermissionAPI(data, id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'put',
    data
  })
}
